// http://192.168.20.5:8080/api/v1/Knowledge/search
import httpAxios from "@/utilx/http/axios.ts";
import {PageResult, SearchById, SearchWithPage} from "@/typex";
import {AxiosResult, cloud} from "@/api/dto";


export namespace KnowledgeApi {
    const routeGroup = "knowledge"
    export const KnowledgeSearch = async (data: SearchWithPage<cloud.KnowledgeReq>): AxiosResult<PageResult<cloud.Knowledge>> => httpAxios.post(routeGroup.concat("/search"), data)
    export const KnowledgeAdd = async (data: any): AxiosResult<boolean> => httpAxios.post(routeGroup.concat("/add"), data)
    export const KnowledgeUpd = async (data: any): AxiosResult<boolean> => httpAxios.post(routeGroup.concat("/upd"), data)
    export const KnowledgeGet = async (data: SearchById): AxiosResult<PageResult<cloud.Knowledge>> => httpAxios.post(routeGroup.concat("/get"), data);
}

